package jp.dip.sys1.android.sharp.walkquest;

import jp.dip.sys1.android.sharp.walkquest.data.SettingPreference;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

public class WalkquestActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        SettingPreference sp = new SettingPreference(this);
        if(sp.getOffset() == -1){
        	findViewById(R.id.continue_button).setVisibility(View.GONE);
        }
        findViewById(R.id.new_button).setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(WalkquestActivity.this, NewGame.class);
				startActivity(intent);
			}
		});
        findViewById(R.id.continue_button).setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(WalkquestActivity.this, GameMain.class);
				startActivity(intent);
			}
		});
    }
}